<?php
/**
 * Created by PhpStorm.
 * User: yangkang
 * Date: 2018/3/13
 * Time: 下午4:43
 */

namespace App\Repositories;


use App\Models\Product;

class ProductRepository
{
    public function getIndexProducts()
    {
        return Product::where('type', '=', 'index')->get();
    }

    public function getProductsByType($type)
    {
        return Product::where('type', '=', $type)->get();
    }
}